import math

PARTITION = 1000000


def integral(b, t, f):
    result = 0
    interval = (t - b) / PARTITION
    for i in range(PARTITION):
        result += interval * f(b)
        b += interval
    return result


def g(x):
    return x


if __name__ == "__main__":
    top = 2
    bottom = -1
    # print(f"{integral(bottom, top, math.sin):.10f}")
    # print(f"{integral(bottom, top, g):.10f}")
    print(f"{integral(bottom, top, math.exp):.10f}")
